package main

import (
	"fmt"
	"regexp"
)

func main() {
	//pattern := `^[a-zA-Z0-9\u4e00-\u9fa5]([a-zA-Z0-9\u4e00-\u9fa5%&\*\(\)_\-\+=\{\}\[\]<>\\':;",\.\/ ]*[a-zA-Z0-9\u4e00-\u9fa5%&\*\(\)_\-\+=\{\}\[\]<>\\':;",\.\/])?$`
	pattern := `^[a-zA-Z0-9\x{4e00}-\x{9fa5}]([a-zA-Z0-9\x{4e00}-\x{9fa5}%&\*\(\)_\-\+=\{\}\[\]<>\\':;",\.\/ ]*[a-zA-Z0-9\x{4e00}-\x{9fa5}%&\*\(\)_\-\+=\{\}\[\]<>\\':;",\.\/])?$`
	//pattern := `^[a-zA-Z0-9\x{4e00}-\x{9fa5}][a-zA-Z0-9\x{4e00}-\x{9fa5}%&*\(\)_\-+=\{\}\[\]<>\\':;",\.\/ ]*$`
	eventRuleNameRegexp := regexp.MustCompile(pattern)
	ifMatch := eventRuleNameRegexp.MatchString("导入事件dfsdfsfd规则测试011111 %&*()_-+={}[]<>\\':;\",.")
	fmt.Println(ifMatch)
}
